<!--修改课程-->
<template>
  <div class="assessment-edit-plan-container">
    <div class="my-form-container" style="height: 100%">
      <el-row class="my-form-item">
        <el-col :span="12">
          <div class="my-form-item-label">开课教研室</div>
          <div class="my-form-item-value">
          <el-select
            v-model="xq"
            style="width: 90px"
            size="mini"
            placeholder="请选择"
          >
            <el-option
              v-for="item in xqList"
              :key="item.value"
              :label="item.label"
              :value="item.value"
            >
            </el-option>
          </el-select>
          </div>
        </el-col>
        <el-col :span="12">
          <div class="my-form-item-label">课程编号</div>
          <div class="my-form-item-value">{{ tablelist.bb }}</div>
        </el-col>
      </el-row>
      <el-row class="my-form-item">
        <el-col :span="12">
          <div class="my-form-item-label">课程名称</div>
          <div class="my-form-item-value">{{ tablelist.bb }}</div>
        </el-col>
        <el-col :span="12">
          <div class="my-form-item-label">课程简称</div>
          <div class="my-form-item-value">{{ tablelist.bk }}</div>
        </el-col>
      </el-row>
      <el-row class="my-form-item">
        <el-col :span="12">
          <div class="my-form-item-label">课程英文名称</div>
          <div class="my-form-item-value">{{ tablelist.bk }}</div>
        </el-col>
        <el-col :span="12">
          <div class="my-form-item-label">学 分</div>
          <div class="my-form-item-value">{{ tablelist.bk }}</div>
        </el-col>
      </el-row>
      <el-row class="my-form-item">
        <el-col :span="12">
          <div class="my-form-item-label">讲授学时</div>
          <div class="my-form-item-value">{{ tablelist.bk }}</div>
        </el-col>
        <el-col :span="12">
          <div class="my-form-item-label">实践学时</div>
          <div class="my-form-item-value">{{ tablelist.bk }}</div>
        </el-col>
      </el-row>
      <el-row class="my-form-item">
        <el-col :span="12">
          <div class="my-form-item-label">总 学 时</div>
          <div class="my-form-item-value">{{ tablelist.bk }}</div>
        </el-col>
        <el-col :span="12">
          <div class="my-form-item-label">学科分类</div>
          <div class="my-form-item-value">
            
          <el-select
            v-model="xq"
            style="width: 90px"
            size="mini"
            placeholder="请选择"
          >
            <el-option
              v-for="item in xqList"
              :key="item.value"
              :label="item.label"
              :value="item.value"
            >
            </el-option>
          </el-select>
          </div>
        </el-col>
      </el-row>
      <el-row class="my-form-item">
        <el-col :span="12">
          <div class="my-form-item-label">适用培养层次</div>
          <div class="my-form-item-value">
            <el-checkbox v-model="checked1">任职</el-checkbox>
            <el-checkbox v-model="checked2">本科</el-checkbox>
            <el-checkbox v-model="checked1">专科</el-checkbox>
            <el-checkbox v-model="checked2">研究生</el-checkbox>
          </div>
        </el-col>
        <el-col :span="12">
          <div class="my-form-item-label">课程负责人</div>
          <div class="my-form-item-value">{{ tablelist.bk }}</div>
        </el-col>
      </el-row>
      <el-row class="my-form-item">
        <el-col :span="12">
          <div class="my-form-item-label">课程评价</div>
          <div class="my-form-item-value">
            <el-select
            v-model="xq"
            style="width: 90px"
            size="mini"
            placeholder="请选择"
          >
            <el-option
              v-for="item in xqList"
              :key="item.value"
              :label="item.label"
              :value="item.value"
            >
            </el-option>
          </el-select>
          </div>
        </el-col>
        <el-col :span="12">
          <div class="my-form-item-label">是否为主干课</div>
          <div class="my-form-item-value">
            
            <el-checkbox v-model="checked1">是</el-checkbox>
            <el-checkbox v-model="checked2">否</el-checkbox>
          </div>
        </el-col>
      </el-row>
      <el-row class="my-form-item">
        <el-col :span="12">
          <div class="my-form-item-label">课程类型</div>
          <div class="my-form-item-value">
          <el-select
            v-model="xq"
            style="width: 90px"
            size="mini"
            placeholder="请选择"
          >
            <el-option
              v-for="item in xqList"
              :key="item.value"
              :label="item.label"
              :value="item.value"
            >
            </el-option>
          </el-select></div>
        </el-col>
        <el-col :span="12">
          <div class="my-form-item-label">分制</div>
          <div class="my-form-item-value">
            
          </div>
        </el-col>
      </el-row>
      <el-row class="my-form-item">
        <el-col :span="12">
          <div class="my-form-item-label">课下作业成绩所占比例</div>
          <div class="my-form-item-value">{{ tablelist.bk }}</div>
        </el-col>
        <el-col :span="12">
          <div class="my-form-item-label">课堂测试成绩所占比例</div>
          <div class="my-form-item-value">{{ tablelist.bk }}</div>
        </el-col>
      </el-row>
      <el-row class="my-form-item">
        <el-col :span="12">
          <div class="my-form-item-label">期中考试成绩所占比例</div>
          <div class="my-form-item-value">{{ tablelist.bk }}</div>
        </el-col>
        <el-col :span="12">
          <div class="my-form-item-label">课中考核成绩所占比例</div>
          <div class="my-form-item-value">{{ tablelist.bk }}</div>
        </el-col>
      </el-row>
      <el-row class="my-form-item">
        <el-col :span="24">
          <div class="my-form-item-label">考试成绩一票否决制</div>
          <div class="my-form-item-value">
            <el-checkbox v-model="checked1">是</el-checkbox>
            <el-checkbox v-model="checked2">否</el-checkbox>
          </div>
        </el-col>
      </el-row>
      <el-row class="my-form-item">
        <el-col :span="24">
          <div class="my-form-item-label">课程主页</div>
          <div class="my-form-item-value"></div>
        </el-col>
      </el-row>
      <el-row class="my-form-item" style="height:160px;">
        <el-col :span="24">
          <div style="width:100%;">
              
      <el-row class="my-form-item">
        <el-col :span="24" style="display: flex; align-items: center">
          <div class="my-form-item-label">课程标准</div>
          <el-input v-model="input2"></el-input>
          <button
            @click="getFile($event)"
            style="
              width: 80px;
              height: 28px;
              background: #ebe6ff;
              border: 1px solid #5230e9;
              border-radius: 4px;
              margin-left: 40px;
              color: #5230e9;
            "
          >
            浏览
          </button>
        </el-col>
      </el-row>
             <el-row class="my-form-item">
        <el-col :span="24" style="display: flex; align-items: center">
          <div class="my-form-item-label">先修课程</div>
          <el-input v-model="input3"></el-input>
          <button
            @click="getFile($event)"
            style="
              width: 100px;
              height: 28px;
              background: #f1fff8;
              border: 1px solid #02c86c;
              border-radius: 4px;
              margin-left: 40px;
              color: #02c86c;
            "
          >
            <img src="../../../assets/assessment/设置.png" class="img" />
            课程设置
          </button>
          <button
            @click="getFile($event)"
            style="
              width: 100px;
              height: 28px;
              background: #ebe6ff;
              border: 1px solid #5230e9;
              border-radius: 4px;
              margin-left: 40px;
              color: #5230e9;
            "
          >
            <img src="../../../assets/assessment/删除.png" class="img" />
            清除课程
          </button>
        </el-col>
      </el-row>
          </div>
        </el-col>
        
      </el-row>
      <el-row class="my-form-item" style="height: 100px">
        <el-col :span="24">
          <div class="my-form-item-label">课程简介</div>
          <el-input
            v-model="tablelist.sm"
            placeholder="请输入"
            class="zyjs"
          ></el-input>
        </el-col>
      </el-row>
      <el-row class="my-form-item" style="height: 100px">
        <el-col :span="24">
          <div class="my-form-item-label">备注</div>
          <el-input
            v-model="tablelist.sm"
            placeholder="请输入"
            class="zyjs"
          ></el-input>
        </el-col>
      </el-row>
  
    </div>
    <div class="button-group">
      <div class="" @click="getsubmit('保存')">保存</div>
      <div class="" @click="getsubmit('取消')">取消</div>
    </div>
  </div>
</template>

<script>
export default {
  data() {
    return {
      syzy: "123",
      kcfl: "分类一",
      showYprDialog: false,
      fileName: "",
      tablelist: {
        mc: "2020春英语",
        bb: "2020春英语",
        syzy: "",
        pyfafl: "",
        edzxf: "90",
        bxkedxf: "90",
        xxkedxf: "90",
        zxkedxf: "90",
        jzkedxf: "90",
        sjjxkedxf: "90",
        jyxledxf: "90",
        sm: "123123",
      },
      syzyList: [
        {
          value: "123",
          label: "123",
        },
      ],
      kcflList: [
        {
          value: "分类一",
          label: "分类一",
        },
      ],
    };
  },
  mounted() {
    // this.getdetail();
    // this.getCreateDId(this.tablelist)
  },
  methods: {
    pjByIdGuide() {},
    getFile(event) {
      let file = event.target.files;
      this.tablelist.fileName = file[0].name;
      console.log(file[0].name);
      // this.fileName=file
      let form = new FormData();
      let id = this.tablelist.id;
      form.append("file", file[0]);
      form.append("id", id);
      let el = this;
      return new Promise(() => {
        getUpload(form).then((res) => {
          if (res.data.code === 200) {
            this.getdetail();
            el.$message({
              showClose: true,
              message: "上传成功",
              type: "success",
            });
          } else {
            el.$message({
              showClose: true,
              message: "上传失败，请重新上传",
              type: "error",
            });
          }
        });
      });
    },
  },
};
</script>
<style lang="less" scoped>
.img {
  width: 17px;
  height: 17px;
  background-size: 100% 100%;
  background-repeat: no-repeat;
}
.bk {
  /deep/ .el-input__inner {
    border-radius: 4px;
    border: 1px solid #004ca7;
  }
}
.zyjs {
  width: 30% !important;
  margin-left: 40px !important;
  /deep/ .el-input__inner {
    height: 70px !important;
    border-radius: 4px;
    border: 1px solid #004ca7;
  }
}

.el-input {
  width: 26%;
  display: flex;
  align-items: center;
  margin-left: 40px;
}
.my-form-item {
  height: 80px;
}
.el-date-editor {
  width: 38%;
}
.choose-ypr-container {
  width: 100%;
  margin: 0px auto;

  .choose-ypr-search-container {
    .el-input--prefix .el-input__inner {
      padding-left: 30px;
    }

    .el-input__inner {
      &::placeholder {
        color: #b8b8b8;
      }

      &::-webkit-input-placeholder {
        /* WebKit browsers 适配谷歌 */
        color: #b8b8b8;
      }

      &:-moz-placeholder {
        /* Mozilla Firefox 4 to 18 适配火狐 */
        color: #b8b8b8;
      }

      &::-moz-placeholder {
        /* Mozilla Firefox 19+ 适配火狐 */
        color: #b8b8b8;
      }

      &:-ms-input-placeholder {
        /* Internet Explorer 10+  适配ie*/
        color: #b8b8b8;
      }
    }

    display: flex;
    flex-direction: row;
    align-items: center;

    .title {
      font-size: 18px;
      font-family: Microsoft YaHei;
      font-weight: bold;
      line-height: 20px;
      color: #004ca7;
      margin-right: 5px;
    }

    .search-button {
      width: 77px;
      height: 28px;
      line-height: 28px;
      background: #f1f8fe;
      border: 1px solid #51aef6;
      border-radius: 6px;
      cursor: pointer;
      display: flex;
      flex-direction: row;
      align-items: center;
      justify-content: center;

      > span {
        font-size: 16px;
        font-family: Microsoft YaHei;
        font-weight: 400;
        color: #51aef6;
      }

      > img {
        width: 20px;
        height: 20px;
        margin-right: 4px;
      }
    }

    .button-list {
      display: flex;
      flex-direction: row;
      align-items: center;
      margin-left: 21px;

      .button-item {
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: center;
        position: relative;
        width: 69px;
        height: 27px;
        line-height: 27px;
        border: 1px solid #004ca7;
        border-radius: 4px;
        margin-right: 10px;
        text-align: center;
        font-size: 14px;
        font-family: Microsoft YaHei;
        font-weight: 400;
        color: #004ca7;

        .del-icon {
          position: absolute;
          right: 0px;
          top: 0px;
          width: 12px;
          height: 12px;
          padding: 2px;
        }
      }
    }
  }

  .choose-ypr-container .choose-ypr-table-container .el-table__header th {
    padding: 0;
    height: 57px;
    background-color: #edf2f9;
    font-size: 16px;
    font-family: Microsoft YaHei;
    font-weight: bold;
    line-height: 20px;
    color: #004ca7;
  }

  /deep/ .el-table .cell {
    color: #004ca7;
  }

  .choose-ypr-table-container {
    margin-top: 30px;

    .el-table td,
    .el-table th.is-leaf,
    .el-table--border,
    .el-table--group {
      border-color: #c7d7eb;
    }

    .el-table__header tr,
    .el-table__header th {
      padding: 0;
      height: 57px;
      background-color: #edf2f9;
      font-size: 16px;
      font-family: Microsoft YaHei;
      font-weight: bold;
      line-height: 20px;
      color: #004ca7;
    }

    .el-table__body tr,
    .el-table__body td {
      padding: 0;
      height: 51px;
    }

    .table-data {
      width: 100%;
      border: 0.8px solid #004ca7;
      border-radius: 9px;
      font-size: 14px;
      font-family: Microsoft YaHei;
      font-weight: 400;
      color: #004ca7;
    }
  }
}

.assessment-container {
  .el-dialog__body {
    height: 251px;
  }

  .el-dialog__footer {
    padding: 10px 20px 45px;
  }

  .el-checkbox__inner:hover {
    border-color: #004ca7;
  }

  .el-checkbox__inner {
    border: 1px solid #004ca7;
    border-radius: 0;
    height: 18px;
    width: 18px;
  }

  .el-checkbox__inner::after {
    height: 10px;
    left: 6px;
  }

  .el-checkbox__input.is-checked .el-checkbox__inner,
  .el-checkbox__input.is-indeterminate .el-checkbox__inner {
    background-color: #004ca7;
    border-color: #004ca7;
  }

  .el-checkbox__input.is-checked + .el-checkbox__label {
    color: #004ca7;
  }

  .el-checkbox.is-bordered.is-checked {
    border-color: #004ca7;
  }

  .el-checkbox__input.is-focus .el-checkbox__inner {
    border-color: #004ca7;
  }
}

.cz-save {
  box-sizing: border-box;
  line-height: 44px;
  border-radius: 4px;
  font-size: 12px;
  font-family: Microsoft YaHei;
  font-weight: 400;
  text-align: center;
  margin-top: 70px;
  margin-left: 40px;
  display: flex;
  flex-direction: row;
  cursor: pointer;
  align-content: center;
  justify-content: center;
  align-items: center;
}

.jf-save {
  display: flex;
  align-items: center;
  margin-left: 48px;
}

.fileClass {
  position: relative;
  cursor: pointer;

  .save {
    width: 120px;
    height: 50px;
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
    color: #fff;
    background: #303133;
  }
}

.my-form-item-value {
  font-size: 16px;
  color: #004ca7;
  height: 100%;
  flex: 1;
  line-height: 60px;
  padding-left: 38px;
  display: flex;
  align-items: center;
}

.assessment-edit-plan-container {
  .assessment-design {
    .el-textarea__inner {
      resize: none;
      font-size: 16px;
      color: rgba(0, 76, 167, 1);
    }
  }
}
</style>
<style scoped lang="less">
.assessment-edit-plan-container {
  .assessment-design {
    padding: 25px 38px !important;
  }

  .button-group {
    margin-top: 50px;
    text-align: center;

    > div {
      display: inline-block;
      font-size: 18px;
      padding: 6px 22px;
      border-radius: 6px;

      &:nth-child(1) {
        color: #f3b815;
        border: 1px solid #f3b815;
        background: #fff6ef;
        margin-right: 139px;
      }

      &:nth-child(2) {
        color: #ff3819;
        border: 1px solid #ff3819;
        background: #ffefef;
      }
    }
  }
}
.mini{
  width: 10%;
  margin-left:0;
}
.my-form-item-value div p span{
  padding:0 5px;
}
</style>
